package net.ljh.controller;


import net.ljh.bean.Draft;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class DraftController {

    @RequestMapping("/draft")
    public String draft(Model model){
        List<Draft> draftList=new ArrayList<>();
        draftList.add(new Draft("LJH1","LBJ",18));
        draftList.add(new Draft("LJH2","KB",19));
        draftList.add(new Draft("LJH3","WB",18));
        model.addAttribute("drafts",draftList);
        return "my";
    }
}
